package com.mystudyspring.studySpringBoot.dto;

import javax.persistence.Column;
import javax.validation.constraints.Min;

/**
 * userDto
 *
 * @author lix
 * @create 2018-04-08 16:42
 */
public class UserDto {
    private Long id;
    private String name;

    @Min(value = 18,message = "未成年禁止入内")
    private Integer age;

    public UserDto(){}

    public UserDto(String name, Integer age) {
        this.name = name;
        this.age = age;
    }
    public String getName() {
        return name;
    }

    public Integer getAge() {
        return age;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }
}
